Optimal. Leaf size=97 \[ \frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}+\frac {b (-c f+d e+f)^2 \log (-c-d x+1)}{4 d^2 f}-\frac {b (d e-(c+1) f)^2 \log (c+d x+1)}{4 d^2 f}+\frac {b f x}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {6111, 5926, 702, 633, 31} \[ \frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}+\frac {b (-c f+d e+f)^2 \log (-c-d x+1)}{4 d^2 f}-\frac {b (d e-(c+1) f)^2 \log (c+d x+1)}{4 d^2 f}+\frac {b f x}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 702
Rule 5926
Rule 6111
Rubi steps
\begin {align*} \int (e+f x) \left (a+b \tanh ^{-1}(c+d x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int \left (\frac {d e-c f}{d}+\frac {f x}{d}\right ) \left (a+b \tanh ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}-\frac {b \operatorname {Subst}\left (\int \frac {\left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^2}{1-x^2} \, dx,x,c+d x\right )}{2 f}\\ &=\frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}-\frac {b \operatorname {Subst}\left (\int \left (-\frac {f^2}{d^2}+\frac {d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2+2 f (d e-c f) x}{d^2 \left (1-x^2\right )}\right ) \, dx,x,c+d x\right )}{2 f}\\ &=\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}-\frac {b \operatorname {Subst}\left (\int \frac {d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2+2 f (d e-c f) x}{1-x^2} \, dx,x,c+d x\right )}{2 d^2 f}\\ &=\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}-\frac {\left (b (d e+f-c f)^2\right ) \operatorname {Subst}\left (\int \frac {1}{1-x} \, dx,x,c+d x\right )}{4 d^2 f}+\frac {\left (b (d e-(1+c) f)^2\right ) \operatorname {Subst}\left (\int \frac {1}{-1-x} \, dx,x,c+d x\right )}{4 d^2 f}\\ &=\frac {b f x}{2 d}+\frac {(e+f x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )}{2 f}+\frac {b (d e+f-c f)^2 \log (1-c-d x)}{4 d^2 f}-\frac {b (d e-(1+c) f)^2 \log (1+c+d x)}{4 d^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 138, normalized size = 1.42 \[ a e x+\frac {1}{2} a f x^2+\frac {b \left (c^2-2 c+1\right ) f \log (-c-d x+1)}{4 d^2}+\frac {b \left (-c^2-2 c-1\right ) f \log (c+d x+1)}{4 d^2}+\frac {b e ((c+1) \log (c+d x+1)-(c-1) \log (-c-d x+1))}{2 d}+b e x \tanh ^{-1}(c+d x)+\frac {1}{2} b f x^2 \tanh ^{-1}(c+d x)+\frac {b f x}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 134, normalized size = 1.38 \[ \frac {2 \, a d^{2} f x^{2} + 2 \, {\left (2 \, a d^{2} e + b d f\right )} x + {\left (2 \, {\left (b c + b\right )} d e - {\left (b c^{2} + 2 \, b c + b\right )} f\right )} \log \left (d x + c + 1\right ) - {\left (2 \, {\left (b c - b\right )} d e - {\left (b c^{2} - 2 \, b c + b\right )} f\right )} \log \left (d x + c - 1\right ) + {\left (b d^{2} f x^{2} + 2 \, b d^{2} e x\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{4 \, d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 536, normalized size = 5.53 \[ \frac {{\left (\frac {{\left (d x + c + 1\right )}^{2} b c f \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} b c f \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d x + c - 1} + b c f \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right ) - \frac {{\left (d x + c + 1\right )}^{2} b d e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{{\left (d x + c - 1\right )}^{2}} + \frac {2 \, {\left (d x + c + 1\right )} b d e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d x + c - 1} - b d e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right ) - \frac {{\left (d x + c + 1\right )}^{2} b c f \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{{\left (d x + c - 1\right )}^{2}} + \frac {{\left (d x + c + 1\right )} b c f \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} + \frac {{\left (d x + c + 1\right )}^{2} b d e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{{\left (d x + c - 1\right )}^{2}} - \frac {{\left (d x + c + 1\right )} b d e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} - \frac {2 \, {\left (d x + c + 1\right )} a c f}{d x + c - 1} + 2 \, a c f + \frac {2 \, {\left (d x + c + 1\right )} a d e}{d x + c - 1} - 2 \, a d e + \frac {{\left (d x + c + 1\right )} b f \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} + \frac {2 \, {\left (d x + c + 1\right )} a f}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} b f}{d x + c - 1} - b f\right )} {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )}}{2 \, {\left (\frac {{\left (d x + c + 1\right )}^{2} d^{3}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{3}}{d x + c - 1} + d^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.04, size = 184, normalized size = 1.90 \[ \frac {a \,x^{2} f}{2}-\frac {a \,c^{2} f}{2 d^{2}}+a x e +\frac {a c e}{d}+\frac {b \arctanh \left (d x +c \right ) f \,x^{2}}{2}-\frac {b \arctanh \left (d x +c \right ) f \,c^{2}}{2 d^{2}}+\arctanh \left (d x +c \right ) x b e +\frac {\arctanh \left (d x +c \right ) b c e}{d}+\frac {b f x}{2 d}+\frac {b c f}{2 d^{2}}-\frac {b \ln \left (d x +c -1\right ) c f}{2 d^{2}}+\frac {b \ln \left (d x +c -1\right ) e}{2 d}+\frac {b \ln \left (d x +c -1\right ) f}{4 d^{2}}-\frac {b \ln \left (d x +c +1\right ) c f}{2 d^{2}}+\frac {b \ln \left (d x +c +1\right ) e}{2 d}-\frac {b \ln \left (d x +c +1\right ) f}{4 d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 109, normalized size = 1.12 \[ \frac {1}{2} \, a f x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} b f + a e x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} b e}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.34, size = 136, normalized size = 1.40 \[ a\,e\,x+\frac {a\,f\,x^2}{2}+\frac {b\,e\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2-1\right )}{2\,d}-\frac {b\,f\,\mathrm {atanh}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,f\,x^2\,\mathrm {atanh}\left (c+d\,x\right )}{2}+\frac {b\,f\,x}{2\,d}+b\,e\,x\,\mathrm {atanh}\left (c+d\,x\right )-\frac {b\,c^2\,f\,\mathrm {atanh}\left (c+d\,x\right )}{2\,d^2}-\frac {b\,c\,f\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2-1\right )}{2\,d^2}+\frac {b\,c\,e\,\mathrm {atanh}\left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.35, size = 173, normalized size = 1.78 \[ \begin {cases} a e x + \frac {a f x^{2}}{2} - \frac {b c^{2} f \operatorname {atanh}{\left (c + d x \right )}}{2 d^{2}} + \frac {b c e \operatorname {atanh}{\left (c + d x \right )}}{d} - \frac {b c f \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d^{2}} + \frac {b c f \operatorname {atanh}{\left (c + d x \right )}}{d^{2}} + b e x \operatorname {atanh}{\left (c + d x \right )} + \frac {b f x^{2} \operatorname {atanh}{\left (c + d x \right )}}{2} + \frac {b e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b f x}{2 d} - \frac {b f \operatorname {atanh}{\left (c + d x \right )}}{2 d^{2}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {atanh}{\relax (c )}\right ) \left (e x + \frac {f x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________